home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.1 / tclsh.1 < prev    next >
Text File  |  1995-07-25  |  6KB  |  132 lines

  1.  
  2.  
  3.  
  4.      ttttccccllllsssshhhh((((1111))))                     TTTTkkkk (((( ))))                      ttttccccllllsssshhhh((((1111))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           tclsh - Simple shell containing Tcl interpreter
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           ttttccccllllsssshhhh ?_f_i_l_e_N_a_m_e _a_r_g _a_r_g ...?
  15.      _________________________________________________________________
  16.  
  17.  
  18.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.           TTTTccccllllsssshhhh is a shell-like application that  reads  Tcl  commands
  20.           from  its  standard input or from a file and evaluates them.
  21.           If invoked with no arguments  then  it  runs  interactively,
  22.           reading  Tcl  commands  from  standard  input  and  printing
  23.           command results and error messages to standard  output.   It
  24.           runs  until  the eeeexxxxiiiitttt command is invoked or until it reaches
  25.           end-of-file on its standard input.  If there exists  a  file
  26.           ....ttttccccllllsssshhhhrrrrcccc  in the home directory of the user, ttttccccllllsssshhhh evaluates
  27.           the file as a Tcl  script  just  before  reading  the  first
  28.           command from standard input.
  29.  
  30.  
  31.      SSSSCCCCRRRRIIIIPPPPTTTT FFFFIIIILLLLEEEESSSS
  32.           If ttttccccllllsssshhhh is invoked with arguments then the  first  argument
  33.           is  the  name  of a script file and any additional arguments
  34.           are made available to the script as variables  (see  below).
  35.           Instead  of  reading commands from standard input ttttccccllllsssshhhh will
  36.           read Tcl commands from the named file;  ttttccccllllsssshhhh will exit when
  37.           it  reaches  the  end  of  the  file.  There is no automatic
  38.           evaluation of ....ttttccccllllsssshhhhrrrrcccc in this case, but the script file can
  39.           always ssssoooouuuurrrrcccceeee it if desired.
  40.  
  41.           If you create a Tcl script in a file whose first line is
  42.  
  43.                ####!!!!////uuuussssrrrr////llllooooccccaaaallll////bbbbiiiinnnn////ttttccccllllsssshhhh
  44.           then you can invoke the script file directly from your shell
  45.           if you mark the file as executable.  This assumes that ttttccccllllsssshhhh
  46.           has   been   installed   in   the   default   location    in
  47.           /usr/local/bin;   if  it's  installed  somewhere  else  then
  48.           you'll have to modify the above line to match.
  49.  
  50.  
  51.      VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS
  52.           TTTTccccllllsssshhhh sets the following Tcl variables:
  53.  
  54.           aaaarrrrggggcccc           Contains  a  count  of  the  number  of   _a_r_g
  55.                          arguments (0 if none), not including the name
  56.                          of the script file.
  57.  
  58.           aaaarrrrggggvvvv           Contains a Tcl list whose  elements  are  the
  59.                          _a_r_g  arguments,  in order, or an empty string
  60.  
  61.  
  62.      Page 1                                           (printed 7/2/95)
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.      ttttccccllllsssshhhh((((1111))))                     TTTTkkkk (((( ))))                      ttttccccllllsssshhhh((((1111))))
  70.  
  71.  
  72.  
  73.                          if there are no _a_r_g arguments.
  74.  
  75.           aaaarrrrggggvvvv0000          Contains  _f_i_l_e_N_a_m_e  if  it   was   specified.
  76.                          Otherwise,  contains  the name by which ttttccccllllsssshhhh
  77.                          was invoked.
  78.  
  79.           ttttccccllll____iiiinnnntttteeeerrrraaaaccccttttiiiivvvveeee
  80.                          Contains 1 if ttttccccllllsssshhhh is running  interactively
  81.                          (no _f_i_l_e_N_a_m_e was specified and standard input
  82.                          is a terminal-like device), 0 otherwise.
  83.  
  84.      PPPPRRRROOOOMMMMPPPPTTTTSSSS
  85.           When ttttccccllllsssshhhh is invoked interactively it normally prompts  for
  86.           each  command  with  ``%%%%  ''.   You can change the prompt by
  87.           setting  the  variables  ttttccccllll____pppprrrroooommmmpppptttt1111  and  ttttccccllll____pppprrrroooommmmpppptttt2222.   If
  88.           variable  ttttccccllll____pppprrrroooommmmpppptttt1111  exists  then it must consist of a Tcl
  89.           script to output a prompt;  instead of outputting  a  prompt
  90.           ttttccccllllsssshhhh will evaluate the script in ttttccccllll____pppprrrroooommmmpppptttt1111.  The variable
  91.           ttttccccllll____pppprrrroooommmmpppptttt2222 is used in a similar way when a newline is typed
  92.           but  the  current command isn't yet complete; if ttttccccllll____pppprrrroooommmmpppptttt2222
  93.           isn't set then no prompt is output for incomplete commands.
  94.  
  95.  
  96.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  97.           argument, interpreter, prompt, script file, shell
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.      Page 2                                           (printed 7/2/95)
  129.  
  130.  
  131.  
  132.